"""
#后台
1.点击销售管理支付记录。
2,点击"订单号"按钮，查看订单已发货还是未发货。
"""
import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

def writeLog(String):
    import time
    rootPath=get_pro_rootpath()
    sysTime=time.strftime("%Y-%m-%d %H:%M:%S",time.localtime())
    f=open(rootPath+r"\testReport\log8.txt","a+",encoding="utf-8")
    f.write("[%s] %s\n"%(sysTime,String))
    f.close()

orderid08=1666578631140002
testCase=("DBshop008_销售管理支付记录")
#进入dbshop后台
driver=openBrowser(urlAdmin)
#登录
DBshopLoginAdmin(driver)
#进入销售管理-支付记录
DBshopEnterMenu2(driver,"销售管理","支付记录")
#进入订单
driver.find_element_by_xpath("//a[text()='1666578631140002']").click()
#获取发货状态
a=driver.find_element_by_xpath("//div[@class='pull-left']").text
left="2022-10-24 10:30 ("
right=")"
b=reGetString(a,left,right)
print(a)
print(b)
#断言
try:
    b == ("已发货")
    writeLog("%s 已发货" % testCase)
except:
    writeLog("%s 未发货" % testCase)
#退出
driver.quit()